﻿using System;
using System.Web;
using _5E.WebInfrastructure.Security;
using StoneAge.Controller.Registry;
using StoneAge.Controller.User;

namespace StoneAge.WebUI
{
    public class Global : HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            StructureMapRegistry.Initialize();
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {
            HttpApplication app = (HttpApplication)sender;
            CustomFormsAuthentication<UserCookie>.SetUserInfo(app.Context);
        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}